<%--
  Created by IntelliJ IDEA.
  User: focus
  Date: 2018/1/8
  Time: 21:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ include file="../base.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <base href="<%=basePath%>">
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
    <meta name="renderer" content="webkit" />
    <title>文章 - WeCenter 社交化问答社区程序</title>
    <meta name="keywords" content="wecenter,知识社区,企业社区,社交问答,问答社区,企业社交,开源社区程序,社交社区程序,开源问答程序,问答网站,social question,微信,微信公众平台,微信开发,微信开发社区,微信应用" />
    <meta name="description" content="WeCenter 是一款知识型的社交化问答社区程序，专注于社区内容的整理、归类和检索，并通过连接微信公众平台，移动APP进行内容分发。"  />
    <link href="css/default/img/favicon.ico?v=20160523" rel="shortcut icon" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="css/icon.css" />
    <link href="css/default/common.css?v=20160523" rel="stylesheet" type="text/css" />
    <link href="css/default/link.css?v=20160523" rel="stylesheet" type="text/css" />
    <link href="js/plug_module/style.css?v=20160523" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        var _4380E171E7F6D6A4B27BBD24910D1BBF="929985360dee05f85b48d128ad40f58c";
        var G_POST_HASH=_4380E171E7F6D6A4B27BBD24910D1BBF;
        var G_INDEX_SCRIPT = "";
        var G_SITE_NAME = "WeCenter 社交化问答社区程序";
        var G_BASE_URL = "http://wenda.wecenter.com";
        var G_STATIC_URL = "http://wenda.wecenter.com/static";
        var G_UPLOAD_URL = "http://wenda.wecenter.com/uploads";
        var G_USER_ID = "41635";
        var G_USER_NAME = "FOCUS";
        var G_UPLOAD_ENABLE = "Y";
        var G_UNREAD_NOTIFICATION = 0;
        var G_NOTIFICATION_INTERVAL = 100000;
        var G_CAN_CREATE_TOPIC = "";
        var G_ADVANCED_EDITOR_ENABLE = "Y";
        var FILE_TYPES = "jpg,jpeg,png,zip,rar,7z";
    </script>

    <script src="js/jquery.2.js?v=20160523" type="text/javascript"></script>
    <script src="js/jquery.form.js?v=20160523" type="text/javascript"></script>
    <script src="js/plug_module/plug-in_module.js?v=20160523" type="text/javascript"></script>
    <script src="js/aws.js?v=20160523" type="text/javascript"></script>
    <script src="js/aw_template.js?v=20160523" type="text/javascript"></script>
    <script src="js/app.js?v=20160523" type="text/javascript"></script>
    <script type="text/javascript" src="js/compatibility.js"></script>
    <!--[if lte IE 8]>
    <script type="text/javascript" src="js/respond.js"></script>
    <![endif]-->
</head>
<noscript unselectable="on" id="noscript">
    <div class="aw-404 aw-404-wrap container">
        <img src="common/no-js.jpg">
        <p>你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!</p>
    </div>
</noscript>
<body>
<%@ include file="../common/header.jsp"%>

<div class="aw-container-wrap">
    <div class="container">
        <div class="row">
            <div class="aw-content-wrap clearfix">
                <div class="col-sm-12 col-md-9 aw-main-content">
                    <div class="aw-mod aw-article-list">
                        <c:forEach var="a" items="${pageResult.list}">
                        <div class="aw-item">
                            <a class="aw-user-name hidden-xs" href="user/${a.createUser.username}">
                                <img alt="" src="http://wenda.wecenter.com/uploads/avatar/000/01/08/78_avatar_mid.jpg" />
                            </a>
                            <div class="aw-content">
                                <div class="mod-body">
                                    <h2><a href="article/${a.id}">${a.title}</a></h2>
                                    <div class="aw-topic-bar">
                                        <div class="tag-bar clearfix">
                                            <c:forEach var="t" items="${a.involvedTopics}">
                                            <span class="topic-tag">
												<a href="topic/${t.id}" class="text" data-id="${t.id}">${t.topicName}</a>
											</span>
                                            </c:forEach>
                                        </div>
                                    </div>
                                    <div class="content-wrap">
                                        <div class="content" id="detail_${a.id}">
                                            <div class="hide-content markitup-box">
                                                <c:choose>
                                                    <c:when test="${fn:length(a.content) <= 200}">
                                                        ${a.content}
                                                    </c:when>
                                                    <c:otherwise>
                                                        ${fn:substring(a.content, 0, 200)}
                                                    </c:otherwise>
                                                </c:choose>
                                            </div>
                                            <c:if test="${fn:length(a.content) > 200}">
                                            <a class="more" href="#" onclick="AWS.content_switcher($('#detail_${a.id}'), $('#detail_more_${a.id}')); return false;">继续阅读 »</a>
                                            </c:if>
                                        </div>
                                        <div class="content markitup-box collapse" id="detail_more_${a.id}">
                                            ${a.content}
                                            <c:if test="${fn:length(a.content) > 200}">
                                            <a class="more" href="#" onclick="AWS.content_switcher($('#detail_more_${a.id}'), $('#detail_${a.id}')); return false;">收起阅读 »</a>
                                            </c:if>
                                        </div>
                                    </div>
                                </div>
                                <div class="mod-footer clearfix">
									<span class="pull-right more-operate text-color-999">
										${a.createUser.username} 发表于 : 1 天前
										<a class="text-color-999" href="article/${a.id}"><i class="icon icon-comment"></i> 评论 (${a.commentCount})</a>
									</span>
                                </div>
                            </div>
                        </div>
                        </c:forEach>
                        <!--分页-->
                        <div class="page-control">
                            <ul class="pagination pull-right">
                                <c:set var="c" value="${pageResult.currentpage}" scope="page"/>
                                <c:set var="e" value="${pageResult.totalpage}" scope="page"/>
                                <c:if test="${c-3 gt 1}">
                                    <li><a href="article/page-1">&lt;&lt;</a></li>
                                </c:if>
                                <c:if test="${c ne 1}">
                                    <li><a href="article/page-${pageResult.previousPage}">&lt;</a></li>
                                </c:if>
                                <c:forEach var="p" items="${pageResult.pageBar}">
                                    <c:if test="${p eq c}">
                                        <li class="active"><a href="javascript:;">${p}</a></li>
                                    </c:if>
                                    <c:if test="${p ne c}">
                                        <li><a href="article/page-${p}">${p}</a></li>
                                    </c:if>
                                </c:forEach>
                                <c:if test="${c ne e}">
                                    <li><a href="article/page-${pageResult.nextPage}">&gt;</a></li>
                                </c:if>
                                <c:if test="${c+3 lt e}">
                                    <li><a href="article/page-${pageResult.totalpage}">&gt;&gt;</a></li>
                                </c:if>
                            </ul>
                        </div>
                    </div>
                    <!-- end 文章列表 -->
                </div>
                <!-- 侧边栏 -->
                <div class="col-sm-3 col-md-3 aw-side-bar hidden-xs hidden-sm">
                    <div class="aw-mod aw-text-align-justify">
                        <div class="mod-head">
                            <a href="topic/all/1" class="pull-right">更多 &gt;</a>
                            <h3>热门话题</h3>
                        </div>
                        <div class="mod-body">
                            <c:forEach var="t" items="${hotTopic}">
                            <dl>
                                <dt class="pull-left aw-border-radius-5">
                                    <a href="topic/${t.id}"><img alt="" src="${t.topicPic}" /></a>
                                </dt>
                                <dd class="pull-left">
                                    <p class="clearfix">
                                        <span class="topic-tag">
                                            <a href="topic/${t.id}" class="text" data-id="${t.id}">${t.topicName}</a>
                                        </span>
                                    </p>
                                    <p><b>${t.discussCount}</b> 个问题, <b>${t.concernNumber}</b> 人关注</p>
                                </dd>
                            </dl>
                            </c:forEach>
                        </div>
                    </div>
                </div>
                <!-- end 侧边栏 -->
            </div>
        </div>
    </div>
</div>

<a class="aw-back-top hidden-xs" href="javascript:;" onclick="$.scrollTo(1, 600, {queue:true});"><i class="icon icon-up"></i></a>
<div id="aw-ajax-box" class="aw-ajax-box"></div>
</body>
</html>